Skip to content

[Agents] Restructure docs#31098

Open
thomasgauvin wants to merge 6 commits into
productionfrom
agents-restructure
Open

[Agents] Restructure docs#31098
thomasgauvin wants to merge 6 commits into
productionfrom
agents-restructure

Conversation

@thomasgauvin
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions github-actions Bot added product:workers Related to Workers product product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. labels May 27, 2026
@cloudflare-docs-bot
Copy link
Copy Markdown

cloudflare-docs-bot Bot commented May 27, 2026

Review

⏸️ Automatic reviews for this PR are paused.

This PR has already received 2 automatic reviews. To run another review, a codeowner can comment /review or /full-review.

Tip: Keep PRs in draft mode until they are ready for review — the bot skips draft PRs automatically.


⏸️ Automatic reviews for this PR are paused.

This PR has already received 2 automatic reviews. To run another review, a codeowner can comment /review or /full-review.

Tip: Keep PRs in draft mode until they are ready for review — the bot skips draft PRs automatically.


💡 1 suggestion found in commit e3baf35.

Suggestions (1)
File Issue
agents/index.mdx line 19 Oxford comma — Browser, Sandbox, AI Search, MCP, Payments and other MCP tools Fix: Add a serial comma before 'and': 'Browser, Sandbox, AI Search, MCP, Payments, and other MCP tools'
Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

This PR requires additional review attention because it affects the following areas:

Redirects

This PR changes current filenames or deletes current files. Make sure you have redirects set up to cover the following paths:

  • /agents/api-reference/durable-execution/
  • /agents/api-reference/
  • /agents/api-reference/sub-agents/
  • /agents/guides/autonomous-responses/
  • /agents/api-reference/chat-agents/
  • /agents/api-reference/client-sdk/
  • /agents/api-reference/email/
  • /agents/api-reference/voice/
  • /agents/guides/webhooks/
  • /agents/guides/push-notifications/
  • /agents/community-mcp-server/
  • /agents/guides/human-in-the-loop/
  • /agents/patterns/
  • /agents/concepts/long-running-agents/
  • /agents/concepts/memory/
  • /agents/concepts/human-in-the-loop/
  • /agents/concepts/workflows/
  • /agents/getting-started/build-a-chat-agent/
  • /agents/guides/slack-agent/
  • /agents/guides/build-a-voice-agent/
  • /agents/getting-started/prompting/
  • /agents/guides/anthropic-agent-patterns/
  • /agents/guides/build-mcp-client/
  • /agents/api-reference/think/
  • /agents/api-reference/mcp-agent-api/
  • /agents/api-reference/mcp-client-api/
  • /agents/api-reference/mcp-handler-api/
  • /agents/model-context-protocol/mcp-portal/
  • /agents/model-context-protocol/mcp-servers-for-cloudflare/
  • /agents/guides/connect-mcp-client/
  • /agents/guides/
  • /agents/guides/oauth-mcp-client/
  • /agents/guides/remote-mcp-server/
  • /agents/guides/securing-mcp-server/
  • /agents/guides/test-remote-mcp-server/
  • /agents/model-context-protocol/authorization/
  • /agents/api-reference/codemode/
  • /agents/model-context-protocol/governance/
  • /agents/model-context-protocol/tools/
  • /agents/model-context-protocol/transport/
  • /agents/model-context-protocol/
  • /agents/platform/limits/
  • /agents/platform/
  • /agents/platform/prompt.txt/
  • /agents/platform/prompting/
  • /agents/api-reference/agents-api/
  • /agents/api-reference/http-sse/
  • /agents/api-reference/protocol-messages/
  • /agents/api-reference/readonly-connections/
  • /agents/api-reference/routing/
  • /agents/api-reference/websockets/
  • /agents/api-reference/agent-tools/
  • /agents/api-reference/chat-sdk/
  • /agents/api-reference/queue-tasks/
  • /agents/api-reference/retries/
  • /agents/api-reference/run-workflows/
  • /agents/api-reference/schedule-tasks/
  • /agents/concepts/agent-class/
  • /agents/api-reference/callable-methods/
  • /agents/api-reference/get-current-agent/
  • /agents/api-reference/sessions/
  • /agents/api-reference/store-and-sync-state/
  • /agents/api-reference/configuration/
  • /agents/guides/cross-domain-authentication/
  • /agents/api-reference/observability/
  • /agents/api-reference/using-ai-models/
  • /agents/api-reference/browse-the-web/
  • /agents/agentic-payments/

@github-actions
Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/public/__redirects @cloudflare/content-engineering, @cloudflare/product-owners
*.astro @cloudflare/content-engineering, @kodster28
*.ts @cloudflare/content-engineering, @kodster28
/src/content/docs/agents/ @irvinebroque, @rita3ko, @elithrar, @thomasgauvin, @threepointone, @whoiskatrin, @cloudflare/product-owners, @cloudflare/ai-agents, @cloudflare/dev-plat-leads
/src/content/docs/workers/ @cloudflare/workers-docs, @GregBrimble, @irvinebroque, @mikenomitch, @korinne, @WalshyDev, @cloudflare/deploy-config, @cloudflare/product-owners, @cloudflare/wrangler, @MattieTK, @cloudflare/dev-plat-leads

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

CI run failed: build logs

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

Broken Links

Found 49 broken link(s) across 29 file(s).

File Link Position Error
content/changelog/access/2026-03-26-mcp-portal-code-mode.mdx /agents/api-reference/codemode/ 9:88 invalid link
content/changelog/agents/2025-03-18-npm-i-agents.mdx /agents/api-reference/agents-api/ 71:19 invalid link
content/changelog/agents/2025-03-18-npm-i-agents.mdx /agents/api-reference/ 130:12 invalid link
content/changelog/agents/2025-03-18-npm-i-agents.mdx /agents/api-reference/agents-api/#client-api 131:8 invalid link
content/changelog/agents/2025-03-18-npm-i-agents.mdx /agents/api-reference/routing/ 132:31 invalid link
content/changelog/agents/2025-04-07-mcp-servers-agents-sdk-updates.mdx /agents/api-reference/routing/ 55:146 invalid link
content/changelog/agents/2026-02-03-agents-workflows-integration.mdx /agents/api-reference/run-workflows/ 178:60 invalid link
content/changelog/agents/2026-02-17-agents-sdk-v0.5.0.mdx /agents/api-reference/protocol-messages/ 76:5 invalid link
content/changelog/agents/2026-02-17-agents-sdk-v0.5.0.mdx /agents/api-reference/chat-agents/#data-parts 84:202 invalid link
content/changelog/agents/2026-02-20-codemode-sdk-rewrite.mdx /agents/api-reference/codemode/ 69:9 invalid link
content/changelog/agents/2026-03-02-agents-sdk-v0.7.0.mdx /agents/api-reference/observability/ 75:44 invalid link
content/changelog/agents/2026-03-02-agents-sdk-v0.7.0.mdx /agents/api-reference/schedule-tasks/#keeping-the-agent-alive 120:63 invalid link
content/changelog/agents/2026-03-17-codemode-sdk-v0.2.1.mdx /agents/api-reference/codemode/ 94:9 invalid link
content/changelog/agents/2026-05-13-agents-sdk-v0.12.4.mdx /agents/api-reference/ 128:14 invalid link
content/changelog/agents/2026-05-13-agents-sdk-v0.12.4.mdx /agents/api-reference/chat-agents/ 128:65 invalid link
content/changelog/workers/2026-03-24-dynamic-workers-open-beta.mdx /agents/api-reference/codemode/ 15:5 invalid link
agent-lee/index.mdx /agents/api-reference/mcp-agent-api/ 126:3 invalid link
agent-lee/index.mdx /agents/concepts/human-in-the-loop/ 133:3 invalid link
agents/communication-channels/chat/autonomous-responses.mdx /agents/api-reference/durable-execution/#startfiber 69:5 invalid link
agents/communication-channels/chat/autonomous-responses.mdx /agents/api-reference/think/#submitmessages 71:34 invalid link
agents/communication-channels/chat/client-sdk.mdx /agents/api-reference/agent-tools/ 619:50 invalid link
agents/communication-channels/webhooks/index.mdx /agents/api-reference/durable-execution/#startfiber 539:130 invalid link
agents/concepts/tools.mdx /agents/api-reference/chat-agents/#server-side-tools 21:115 invalid link
agents/concepts/tools.mdx /agents/api-reference/chat-agents/#client-side-tools 22:115 invalid link
agents/concepts/tools.mdx /agents/model-context-protocol/ 24:115 invalid link
agents/concepts/tools.mdx /agents/api-reference/agent-tools/ 25:115 invalid link
agents/getting-started/index.mdx /agents/getting-started/build-a-chat-agent/ 25:1 invalid link
agents/mcp/apis/agent-api.mdx /agents/mcp/tools 43:117 invalid link
agents/runtime/execution/agent-tools.mdx /agents/api-reference/think/#choose-a-turn-api 21:226 invalid link
agents/runtime/execution/agent-tools.mdx /agents/api-reference/sub-agents/ 238:1 invalid link
agents/runtime/execution/agent-tools.mdx /agents/api-reference/chat-agents/ 244:1 invalid link
ai-crawl-control/reference/worker-templates.mdx /agents/agentic-payments/x402/ 27:3 invalid link
api-shield/management-and-monitoring/endpoint-labels.mdx /agents/model-context-protocol/ 59:58 invalid link
cloudflare-one/access-controls/ai-controls/mcp-portals.mdx /agents/model-context-protocol/authorization/ 26:253 invalid link
cloudflare-one/access-controls/ai-controls/mcp-portals.mdx /agents/api-reference/codemode/ 274:1 invalid link
cloudflare-one/access-controls/ai-controls/mcp-portals.mdx /agents/api-reference/codemode/ 309:63 invalid link
cloudflare-one/access-controls/ai-controls/mcp-portals.mdx /agents/guides/remote-mcp-server/#connect-your-mcp-server-to-claude-and-other-mcp-clients 378:225 invalid link
cloudflare-one/access-controls/ai-controls/mcp-portals.mdx /agents/api-reference/codemode/ 518:89 invalid link
cloudflare-one/access-controls/ai-controls/secure-mcp-servers.mdx /agents/guides/remote-mcp-server/#connect-your-mcp-server-to-claude-and-other-mcp-clients 185:250 invalid link
cloudflare-one/access-controls/ai-controls/secure-mcp-servers.mdx /agents/guides/remote-mcp-server/#connect-your-mcp-server-to-claude-and-other-mcp-clients 450:248 invalid link
docs-for-agents/index.mdx /agents/api-reference/codemode/ 53:5 invalid link
docs-for-agents/index.mdx /agents/model-context-protocol/mcp-servers-for-cloudflare/ 56:168 invalid link
dynamic-workers/getting-started.mdx /agents/api-reference/codemode/ 20:70 invalid link
reference-architecture/diagrams/ai/ai-vibe-coding-platform.mdx /agents/model-context-protocol/ 55:156 invalid link
workers/demos/chatgpt-app.mdx /agents/api-reference/agents-api/ 867:1 invalid link
workers/get-started/prompting.mdx /agents/model-context-protocol/mcp-servers-for-cloudflare/ 21:273 invalid link
workers/runtime-apis/bindings/worker-loader.mdx /agents/api-reference/codemode/ 33:50 invalid link
workers/runtime-apis/bindings/worker-loader.mdx /agents/model-context-protocol/ 35:52 invalid link
workflows/get-started/durable-agents.mdx /agents/api-reference/run-workflows/ 650:1 invalid link

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

Preview URL: https://fcdf4406.preview.developers.cloudflare.com
Preview Branch URL: https://agents-restructure.preview.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/agents/examples/email-agent/ https://agents-restructure.preview.developers.cloudflare.com/agents/examples/email-agent/
https://developers.cloudflare.com/agents/concepts/agentic-patterns/long-running-agents/ https://agents-restructure.preview.developers.cloudflare.com/agents/concepts/agentic-patterns/long-running-agents/
https://developers.cloudflare.com/agents/api-reference/sub-agents/ https://agents-restructure.preview.developers.cloudflare.com/agents/api-reference/sub-agents/
https://developers.cloudflare.com/agents/harnesses/think/ https://agents-restructure.preview.developers.cloudflare.com/agents/harnesses/think/
https://developers.cloudflare.com/agents/api-reference/durable-execution/ https://agents-restructure.preview.developers.cloudflare.com/agents/api-reference/durable-execution/
https://developers.cloudflare.com/agents/communication-channels/slack/ https://agents-restructure.preview.developers.cloudflare.com/agents/communication-channels/slack/
https://developers.cloudflare.com/agents/examples/browser-agent/ https://agents-restructure.preview.developers.cloudflare.com/agents/examples/browser-agent/
https://developers.cloudflare.com/agents/examples/code-review-agent/ https://agents-restructure.preview.developers.cloudflare.com/agents/examples/code-review-agent/
https://developers.cloudflare.com/agents/runtime/execution/durable-execution/ https://agents-restructure.preview.developers.cloudflare.com/agents/runtime/execution/durable-execution/
https://developers.cloudflare.com/agents/runtime/execution/sub-agents/ https://agents-restructure.preview.developers.cloudflare.com/agents/runtime/execution/sub-agents/
https://developers.cloudflare.com/agents/concepts/conversation-state-and-memory/ https://agents-restructure.preview.developers.cloudflare.com/agents/concepts/conversation-state-and-memory/
https://developers.cloudflare.com/agents/concepts/human-in-the-loop/ https://agents-restructure.preview.developers.cloudflare.com/agents/concepts/human-in-the-loop/
https://developers.cloudflare.com/agents/communication-channels/chat/chat-agents/ https://agents-restructure.preview.developers.cloudflare.com/agents/communication-channels/chat/chat-agents/
https://developers.cloudflare.com/agents/communication-channels/voice/ https://agents-restructure.preview.developers.cloudflare.com/agents/communication-channels/voice/
https://developers.cloudflare.com/agents/concepts/workflows/ https://agents-restructure.preview.developers.cloudflare.com/agents/concepts/workflows/

- Rename concept page title to Conversation state and memory (order 4)
- Rename MCP top-level title to Model Context Protocol (MCP)
- Update RAG title and diagram label to Retrieval Augmented Generation (RAG)
- Add redirect for /agents/concepts/memory/
Copy link
Copy Markdown
Contributor

@irvinebroque irvinebroque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Diagram is killer 🙌
  • A lot of the examples don't use Think, but also don't use another harness. If I'm coming in here and I read the diagram and "get it" that the Agents SDK is the runtime for the harness, and then I read an example, I have questions like, wait - what harness is being used here?

🚀 🚀 🚀 non-blocking, we can keep making better and better (though I do think really showing many harnesses will help orient people, and will help people understand what Think is by having things to reference against, etc.)

Most AI applications today are stateless — they process a request, return a response, and forget everything. Real agents need more. They need to remember conversations, act on schedules, call tools, coordinate with other agents, and stay connected to users in real-time. The Agents SDK gives you all of this as a TypeScript class.
Build and host Agents on Cloudflare, connect chat, voice, email, Slack, and webhooks to a durable agent runtime with Browser, Sandbox, AI Search, MCP, Payments and other MCP tools.

When you host agents on Cloudflare, each agent has a durable identity, local SQL storage, real-time connections, scheduled work, and recoverable execution.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When you host agents on Cloudflare, each agent has a durable identity, local SQL storage, real-time connections, scheduled work, and recoverable execution.
When you host agents on Cloudflare, each agent session has a durable identity, local SQL storage, real-time connections, scheduled work, and recoverable execution.

People use varying language around "agent" vs. "agent session" but it seems like the point we would want to convey is that each "session" or "run" of the agent has its own distinct storage, etc.? Because that is so much more powerful than just "each agent is its own DO" and someone coming away maybe misunderstanding it?

</div>
<div class="section-row">
<a href="/agents/harnesses/think/">Project Think</a>
<a href="/agents/runtime/agents-api/">Build-your-own agent</a>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like having docs for other harnesses will help people truly get it that Project Think is a harness?

Like if I see that there is:

  • Project Think
  • Pi
  • Codex
  • Flue

All together then no matter what my frame of reference is for what I am familiar with or not (not everyone will know all of these) then I "get it" even if I am still somewhat shaky on what a harness is, etc.

@@ -0,0 +1,434 @@
---
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love that this diagram is interactive, clever

Agents on Cloudflare are composed from four parts:

- **Communication channels** define how users and systems reach your agent, such as [chat](/agents/communication-channels/chat/), [voice](/agents/communication-channels/voice/), [email](/agents/communication-channels/email/), [Slack](/agents/communication-channels/slack/), [webhooks](/agents/communication-channels/webhooks/), and other event sources.
- **The agent harness** defines the loop: how the agent calls models, selects tools, handles tool results, streams responses, and decides whether to continue. Use [Project Think](/agents/harnesses/think/) for an opinionated harness, or build your own loop directly on the [Agents SDK runtime](/agents/runtime/agents-api/).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if minimal, is there a path to show pi and flue as other harnesses that is possible to use?

Both so that people "get it" on what Think is and so that people understand that building agents on Cloudflare isn't "use Think or build the whole thing yourself" - I feel like i have options if presented to me, and therefore more comfortable betting on the Cloudflare-native way in Think

<AgentsPlatformDiagram />

The mental model is simple: define a TypeScript class, give each real-world thing a stable name, and route requests or WebSocket connections to that named instance. The instance wakes when something happens, reads its durable state, does work, and hibernates when idle.
Agents on Cloudflare are composed from four parts:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part is so strong and clear that might even lead with it

<AgentsPlatformDiagram />

The mental model is simple: define a TypeScript class, give each real-world thing a stable name, and route requests or WebSocket connections to that named instance. The instance wakes when something happens, reads its durable state, does work, and hibernates when idle.
Agents on Cloudflare are composed from four parts:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think we are maybe missing inference from this? i.e. — that you can use any model, that there is AI Gateway that supports hosted Workers AI models and hosted models, etc.

The starter includes streaming AI chat, server-side and client-side tools, human-in-the-loop approval, and task scheduling — a foundation you can build on or tear apart. You can also swap in [OpenAI, Anthropic, Google Gemini, or any other provider](/agents/runtime/operations/using-ai-models/).

<TypeScriptExample>
### Example agents
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YES - love putting this front and center here with clear use cases


Check the [GitHub page](https://github.com/cloudflare/mcp-server-cloudflare) to learn how to use Cloudflare's remote MCP servers with different MCP clients.

## Cloudflare Community MCP server
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not quite sure I follow why this is here?

We should probably update these docs to be clearer that the Code Mode MCP server is the MCP server and de-emphasize the rest?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. product:workers Related to Workers product size/xl

Projects

None yet

Development

Successfully merging this pull request may close these issues.